package com.yc.sole.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yc.sole.common.enums.CommonState;
import jakarta.persistence.*;
import lombok.Data;

/**
 * 对象
 *
 * @author yizuomin
 * @date 2023-03-26
 **/
@Data
@Entity
@Table(name = "sys_role")
@TableName(value = "sys_role")
public class Role {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    /**
     * 角色编码
     */
    @Column(columnDefinition = "VARCHAR(50) NOT NULL COMMENT '角色编码'")
    private String roleCode;
    /**
     * 角色名称
     */
    @Column(columnDefinition = "VARCHAR(50) NOT NULL COMMENT '角色名称'")
    private String roleName;
    /**
     * 状态 0无效 1有效
     */
    @Column(columnDefinition = "TINYINT(1) NOT NULL COMMENT '状态 0无效 1有效'")
    private CommonState state;
    /**
     * 备注
     */
    @Column(columnDefinition = "VARCHAR(255) COMMENT '备注'")
    private String remark;
}
